//
//  DataTypeTranslate.h
//  UTDoorStyle
//
//  Created by chaiyanan on 14-9-28.
//  Copyright (c) 2014年 exmart. All rights reserved.
//

#import <Foundation/Foundation.h>

#define KDateFormatterTypeYMDHMSFFF @"yyyy-MM-dd HH:mm:ss.fff"
#define KDateFormatterTypeYMDHMS @"yyyy-MM-dd HH:mm:ss"
#define KDateFormatterTypeYMD @"yyyy-MM-dd"
#define KDateFormatterTypeHMS @"HH:mm:ss"
#define KDateFormatterTypeHM @"HH:mm"
#define KDateFormatterTypeYMDHM @"yyyy-MM-dd HH:mm"
#define KDateFormatterTypeMDHM @"MM-dd HH:mm"


@interface DataTypeTranslate : NSObject

+ (NSString *)stringToString:(NSString *)str;

+ (id)stringToIntNumber:(NSString *)str;

+ (id)stringToDoubleNumber:(NSString *)str;

+ (id)stringToFloatNumber:(NSString *)str;

+ (NSString *)numberToString:(NSNumber *)num;

+ (NSString *)arrayToJsonString:(NSArray *)ary;

+ (NSString *)dictionaryToJsonString:(NSDictionary *)dict;

+ (NSString *)dateToString:(NSDate *)date withFormatterType:(NSString *)formatterType;

+ (NSDate *)string2Date:(NSString *)dateStr withFormatterType:(NSString *)formatterType;

+ (NSString *)getAmOrPmWithDateStr:(NSString *)dateStr;//dateStr formatter: 13:43 return AM/PM

+ (NSString *)decodeBase64String:(NSString *)base64Str;

+ (NSString *)encodeBase64String:(NSString *)base64Str;

@end
